package com.student.dao;

import com.student.entity.Student;
import org.apache.ibatis.annotations.*;

@Mapper
public interface StudentDao {

    //新增学生信息
    @Insert("insert into student(name,age,sex,sno,school) values(#{name},#{age},#{sex},#{sno},#{school})")
    void addStudent(Student student);

    //删除学生信息
    @Delete("delete from student where sno=#{sno}")
    void deleteStudent(String sno);

    //修改学生信息
    @Update("update student set name=#{name},age=#{age},sex=#{sex},school=#{school} where sno=#{sno}")
    void updateStudent(Student student);

    //查询学生信息
    @Select("select * from student where sno=#{sno}")
    Student getStudent(String sno);
}
